package homework1;

public class AdvanceMatch extends InitMatch implements ITournament {

	ITournament feeder;
	ITournament feeder2;

	public AdvanceMatch(MatchData data, ITournament feeder, ITournament feeder2) {
		super( data );
		this.feeder = feeder;
		this.feeder2 = feeder2;
	}
	
	public boolean allValid(){
		return data.score.isValid() && feeder.allValid() && feeder2.allValid();
	}
	public int matchesPlayed( String name ) {
		return super.matchesPlayed(name) + feeder.matchesPlayed(name) + feeder2.matchesPlayed(name);
	}

}
